<table width="100%"><tr><td width="20%">
<a href="../index.html">&lt; index</a><br />
<a href="index.html">&lt; 5. Image toolkit</a>
</td><td width="60%">
<p align="center">
=====================================<br />
5.4 Filling an image with a color<br />
=====================================<br />
</p></td><td width="20%">
</td></tr></table>
<style type="text/css">
.code { color:#444444; background-color:#EEEEEE;}
pre { color:#444444; background-color:#EEEEEE;}
table.param td { border : 1px solid #000000; }
th { background-color: #44BBFF; color: #FFFFFF }
table.none td { border : 0 }
</style>
You can fill the whole image with a color with :<br/>
<p class="code"><pre>
C++ : void TCODImage::clear(const TCODColor color)
C   : void TCOD_image_clear(TCOD_image_t image, TCOD_color_t color)
Py  : image_clear(image,color)
</pre></p>
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>image</td><td>In the C and python version, the image to fill.</td></tr>
<tr><td>color</td><td>The color to use.</td></tr>
</table>
Example :<br />
<p class="code"><pre>
C++ : pix->clear(TCODColor::red);
C   : TCOD_image_clear(pix,TCOD_red);
Py  : libtcod.image_clear(pix,libtcod.red)
</pre></p>
